package com.jsyso.weixin.api;

import com.jsyso.jsyso.lang.JStringUtils;
import com.jsyso.weixin.utils.Params;
import com.jsyso.weixin.utils.XML;

/**
 * 微信支付api
 * @author janjan
 *
 */
public class PaymentAPI extends API {
	protected static String PAY_UNIFIEDORDER = "/pay/unifiedorder";
	
	public API unifiedorder(Params params) {
		this.method = RequestMethod.POST;
		this.postData = XML.mapToXml(params.getData());
		this.responseType = ResponseType.XML;
		this.url = JStringUtils.newBuilder(API_MCH_WEIXIN_QQ_COM, PAY_UNIFIEDORDER).toString();
		return this;
	}
}
